import { Address, Boolean, Code, CreateDate, Digdit, Entity, Jsonb, Latlng, Money, PrimaryUuid, Title, UpdateDate } from "@sker/core";


@Entity({ name: 'gym_card' })
export class GymCard {
    @PrimaryUuid({
        primaryKeyConstraintName: "PK_GYM_CARD_ID2"
    })
    id: string;

    @Code({ comment: '卡片类型，如：团课，私教等' })
    category: string;

    @Title({ comment: '卡名称' })
    title: string;

    @Code({ comment: '项目类型，一对多、一对一等' })
    type: string;

    @Code({ comment: '适用范围说明，说明文字', nullable: true })
    desc: string;

    @Money({ comment: '原价', default: 0 })
    originprice: number;

    @Money({ comment: '价格' })
    price: number;

    @Boolean({comment: '是否可用余额支付'})
    can_use_credit: boolean;

    @Digdit({ comment: '课时数' })
    credit: number;

    @Address({ comment: '上课地点' })
    address: string;

    @Latlng({ comment: '经纬度', nullable: true })
    latlng: any;

    @Jsonb({ label: '适用范围', comment: '适用范围，绑定课程ID', nullable: true })
    can_use_to: string[];

    @CreateDate()
    create_date: Date;

    @UpdateDate()
    update_date: Date;
}